package com.web.portal.services.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.web.portal.mapper.ActivityMapper;
import com.web.portal.pojo.Activity;
import com.web.portal.pojo.PortalUser;
import com.web.portal.pojo.response.ActivityAndUser;
import com.web.portal.services.ActivityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ActivityServiceImpl extends ServiceImpl<ActivityMapper, Activity>
        implements ActivityService {
    @Autowired
    private ActivityMapper activityMapper;
    @Override
    public Activity selectActivityByActivityCode(String activityCode) {
        QueryWrapper<Activity> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("activity_code", activityCode);
        return activityMapper.selectOne(queryWrapper);
    }
}
